package cn.com.cifi.mars.web.action.sys;

import java.util.List;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import cn.com.cifi.mars.bean.dto.ProjectByStagesDto;
import cn.com.cifi.mars.bean.vo.sys.rsp.CityVo;
import cn.com.cifi.mars.bean.vo.sys.rsp.ProjectVo;
import cn.com.cifi.mars.bean.vo.sys.rsp.RegionVo;
import cn.com.cifi.mars.bean.vo.sys.rsp.StagesVo;
import cn.com.cifi.mars.common.bean.R;
import cn.com.cifi.mars.common.constants.VersionConstant;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;

@Api(tags = {"系统管理"})
@RequestMapping("/${spring.data.rest.base-path}/{apiVersion}/sys/org")
public interface IOrgController {

	@ApiOperation(value = "组织机构树形菜单", notes = "组织机构树形菜单")
	@GetMapping(value = "treeList")
	public R<String> getOrgTreeList(
			@ApiParam(value = "接口版本", required = true, defaultValue = VersionConstant.V1) @PathVariable(value = "apiVersion") String apiVersion);
	
	@ApiOperation(value = "显示区域(下拉框)", notes = "显示区域(下拉框)")
	@GetMapping(value = "region")
	public R<List<RegionVo>> getRegion(
			@ApiParam(value = "接口版本", required = true, defaultValue = VersionConstant.V1) @PathVariable(value = "apiVersion") String apiVersion);

	@ApiOperation(value = "显示项目(下拉框)", notes = "显示项目(下拉框)")
	@GetMapping(value = "project")
	public R<List<ProjectVo>> getProject(
			@ApiParam(value = "接口版本", required = true, defaultValue = VersionConstant.V1) @PathVariable(value = "apiVersion") String apiVersion,
			@ApiParam(value = "区域id", required = false) @RequestParam(name = "regionId", defaultValue = "") String regionId);
	
	@ApiOperation(value = "显示分期(下拉框)", notes = "显示分期(下拉框)")
	@GetMapping(value = "stages")
	public R<List<StagesVo>> getStages(
			@ApiParam(value = "接口版本", required = true, defaultValue = VersionConstant.V1) @PathVariable(value = "apiVersion") String apiVersion,
			@ApiParam(value = "项目id", required = false) @RequestParam(name = "projectId", defaultValue = "") String projectId);
	
	@ApiOperation(value = "带权限项目分期V1版本", notes = "带权限项目分期V1版本")
	@GetMapping(value = "stagesV1")
	public R<List<ProjectByStagesDto>> getStagessV1(
			@ApiParam(value = "接口版本", required = true, defaultValue = VersionConstant.V1) @PathVariable(value = "apiVersion") String apiVersion);

	@ApiOperation(value = "显示城市公司(下拉框)", notes = "显示城市公司(下拉框)")
	@GetMapping(value = "city")
	public R<List<CityVo>> getCityList(
			@ApiParam(value = "接口版本", required = true, defaultValue = VersionConstant.V1) @PathVariable(value = "apiVersion") String apiVersion,
			@ApiParam(value = "区域id", required = false) @RequestParam(name = "regionId", defaultValue = "") String regionId);
	
}
